/*

Author   : chaos

FileName : set_flag.cpp

Date     : 16/08/17 03:41:19
*/
#include <iostream>
using namespace std;

int main(int argc ,char *argv[])
{
    double d = 24.546;
    int n = 24;

    cout.setf(ios::fixed);

    cout << "Showing number by fixed-point notation...";
    cout << endl << d << endl;

    cout.unsetf(ios::fixed);
    cout .setf(ios::scientific);
    cout << "Showing number by scientific notation...";
    cout << endl << d << endl;

    cout.setf(ios::oct);
    cout << "show 24 in octal ...." << endl <<n << endl;

    cout.setf(ios::hex,ios::basefield);
    cout <<"Showing 24 in hexadecimal ..." << endl << n << endl;
    return 0;
}
